package com.tianji.api.client.promotion;

import com.tianji.api.client.promotion.fallback.PromotionFallback;
import com.tianji.api.dto.promotion.CouponDiscountDTO;
import com.tianji.api.dto.promotion.OrderCourseDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author Yandel
 * @date 2025/8/20 下午12:47
 * @description: 促销服务 feign 接口
 */
@FeignClient(name = "promotion-service",fallbackFactory = PromotionFallback.class)
public interface PromotionClient {

    /**
     * 该方法是给tj-trade服务，远程调用使用
     * @param
     * @return
     */
    @PostMapping("user-coupons/available")
    public List<CouponDiscountDTO> findDiscountSolution(@RequestBody List<OrderCourseDTO> orderCourses);




}
